package org.crspta.gohomenotes.domain;

import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import org.springframework.roo.addon.javabean.RooJavaBean;
import org.springframework.roo.addon.jpa.activerecord.RooJpaActiveRecord;
import org.springframework.roo.addon.tostring.RooToString;

@RooJavaBean
@RooToString
@RooJpaActiveRecord(finders = { "findFamilysByFamilyId" })
public class Family {

    private String familyId;

    private String familyIdType;

    @OneToOne
    private Address address;

    @ManyToOne
    private Person father;

    @ManyToOne
    private Person mother;

    @ManyToMany(cascade = CascadeType.ALL)
    private Set<Person> children = new HashSet<Person>();
}
